package com.codeyourlife.service.impl;

import org.springframework.beans.factory.annotation.Autowired;  
import org.springframework.stereotype.Service;  


import com.codeyourlife.dao.UserDao;
import com.codeyourlife.entity.User;  
import com.codeyourlife.service.UserService; 

@Service("userService")  
public class UserServiceImpl implements UserService {  
  
    @Autowired  
    private UserDao userDao;  
  
    public void setUserDao(UserDao userDao) {  
        this.userDao = userDao;  
    }  
      
    public void addUser(User user) {   
        userDao.addUser(user);  
    } 
    
    public void updateUser(User user) {   
        userDao.updateUser(user);  
    } 
    
    public User findByName(String email) {
		return userDao.findByName(email);
	}

	public User logincheck(String email, String password) {
		return userDao.logincheck(email,password);
	}
}  
